package com.singfan.core;

import com.singfan.common.ServerEnv;
import com.singfan.common.db.DbContext;
import com.singfan.common.nosql.mongo.MongoContext;
import com.singfan.core.dao.database.config.ConfigDataManager;

/**
 * 星范儿核心业务上下文类
 * Author: hansonghe
 * Date: 2015-08-19 14:54
 * Desc:
 */
public class SingFanContext {
    /**
     * 初始化星范核心业务
     */
    public static void init(){
        System.out.println(String.format("SingFanContext %1$s init start ...", ServerEnv.getEnv()));
        DbContext.init();
        MongoContext.init();
        ConfigDataManager.getInstance().loadConfigData();
        System.out.println("SingFanContext init successful !");
    }
}
